# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-game-libretro-fbneo
pkgver=1.0.0.71
_realname=Nexus
pkgrel=0
pkgdesc="FinalBurn Neo GameClient for Kodi"
options="!check" # no test suite
url="https://github.com/kodi-game/game.libretro.fbneo"
arch="x86_64 aarch64 armv7" # kodi is available only on these architectures
license="GPL-2.0-or-later"
depends="kodi-game-libretro libretro-fbneo"
makedepends="cmake kodi-dev samurai"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/kodi-game/game.libretro.fbneo/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/game.libretro.fbneo-$pkgver-$_realname"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	rm -f "$pkgdir"/usr/lib/kodi/addons/game.libretro.fbneo/game.libretro.fbneo.so
	ln -s /usr/lib/libretro/fbneo_libretro.so \
		"$pkgdir"/usr/lib/kodi/addons/game.libretro.fbneo/game.libretro.fbneo.so
}

sha512sums="
aff721d7d062f1e58c21340d0c2f3500ccd0c45350179b36c14e6015a04386899517908eddceaea80087372d11600e8f7af92c7ae198a0a77acb190e443ec4b6  kodi-game-libretro-fbneo-1.0.0.71-Nexus.tar.gz
"
